Conversation
YoshiRulz
left a comment
There was a problem hiding this comment.
Per #4629 (comment) I believe this is the wrong approach.
…er did a memory read or write.
Reasons given for requested change are incorrect. User has not responded to further explanation of why the current approach is best.
YoshiRulz
left a comment
There was a problem hiding this comment.
For the avoidance of doubt, here's an elaboration of the comment I previously linked to. (The rest of the discussion regards Lua and is not relevant here.)
Implementors of IToolForm.Restart are expected to use the updated values that have just been provided:
BizHawk/src/BizHawk.Client.EmuHawk/tools/ToolManager.cs
Lines 604 to 608 in c8af415
If a tool needed to unhook from a core in some way, it can do that in for example the setter method of
[RequiredService] IEmulator _maybeCore. A separate Stop method would be redundant.You're trying to sculpt the tools' lifecycle, modelled on WinForms', into something that resembles a Lua script's lifecycle. That's what I mean by "the wrong approach".
Wouldn't the old core already be disposed by the time that setter is called? (This would introduce additional complications if we have multiple services, but that's really an issue with using reflection which is another thing I intend to eventually fix.)
No I'm not. The tool's lifecycle isn't relevant here. We care about the core being disposed, not the tool. |
See #4629
Check if completed: